﻿@model IAS.WEB.ViewModels.HomeViewModel
@{
    ViewBag.Title = "登录";
    Layout = null;
    var session = Model.Session;
    var userName = session.UserName ?? session.Email;
}
<!DOCTYPE html>

<html>
<head lang="zh-cn">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta charset="utf-8" />
	<title>登陆页 - Elite OA</title>

	<meta name="description" content="User login page" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

	<!-- bootstrap & fontawesome -->
	<link rel="stylesheet" href="~/Content/aceAdmin/css/bootstrap.min.css" />
	<link rel="stylesheet" href="~/Content/aceAdmin/css/font-awesome.min.css" />

	<!-- text fonts -->
	<link rel="stylesheet" href="~/Content/aceAdmin/css/ace-fonts.css" />

	<!-- ace styles -->
	<link rel="stylesheet" href="~/Content/aceAdmin/css/ace.min.css" />

	<link rel="stylesheet" href="~/Content/aceAdmin/css/ace-rtl.min.css" />
    
</head>
<body class="login-layout">
	<div class="main-content">
		<div class="row">
			<div class="col-sm-10 col-sm-offset-1">
				<div class="login-container">
					<div class="center">
						<h1>
							<i class="ace-icon fa fa-leaf green"></i>
							<span class="red">Ace</span>
							<span class="white" id="id-text2">Application</span>
						</h1>
						<h4 class="blue" id="id-company-text">&copy; 金日科技</h4>
					</div>
					<div class="space-6"></div>
					<div id="login-box" class="login-box visible widget-box no-border">
						<div class="widget-body">
							<div class="widget-main">
								<h4 class="header blue lighter bigger">
									<i class="ace-icon fa fa-coffee green"></i>
									请输入登录信息
								</h4>

								<div class="space-6"></div>

								@using (Html.BeginForm("Login", "Login", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
								{
									@Html.AntiForgeryToken()

									<fieldset>
										@Html.ValidationSummary(true, "", new { @class = "text-danger" })

										<label class="block clearfix">
											<span class="block input-icon input-icon-right">
												@*<input type="text" class="form-control" placeholder="用户名" />*@
                                                <input class="form-control input-lg" id="userName" name="userName" type="text" placeholder="用户名" value="@userName">
												<i class="ace-icon fa fa-user"></i>
											</span>
											@*@Html.ValidationMessageFor(_ => @userName, "", new { @class = "text-danger" })*@
										</label>

										<label class="block clearfix">
											<span class="block input-icon input-icon-right">
												@*<input type="password" class="form-control" placeholder="密码" />*@
                                                <input class="form-control input-lg" id="password" name="password" type="password" placeholder="密码">
												<i class="ace-icon fa fa-lock"></i>
											</span>
											@*@Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })*@
										</label>

										<div class="space"></div>

										<div class="clearfix">
											<label class="inline">
												<input type="checkbox" class="ace" name="rememberMe"/>
												<span class="lbl"> 记住密码</span>
											</label>

											<button type="submit" class="width-35 pull-right btn btn-sm btn-primary" id="btnLogin">
												<i class="ace-icon fa fa-key"></i>
												<span class="bigger-110">登录</span>
											</button>
										</div>

										<div class="space-4"></div>
									</fieldset>
								}

							</div><!-- /.widget-main -->

							<div class="toolbar clearfix">
								<div>
									<a href="@Url.Action("ForgotPassword", "Account")" data-target="#forgot-box" class="forgot-password-link">
										<i class="ace-icon fa fa-arrow-left"></i>
										找回密码
									</a>
								</div>

								<div>
									<a href="@Url.Action("Register", "Account")" data-target="#signup-box" class="user-signup-link">
										我要注册
										<i class="ace-icon fa fa-arrow-right"></i>
									</a>
								</div>
							</div>
						</div><!-- /.widget-body -->
					</div><!-- /.login-box -->
					<div class="navbar-fixed-top align-right">
						<br />
						&nbsp;
						<a id="btn-login-dark" href="#">Dark</a>
						&nbsp;
						<span class="blue">/</span>
						&nbsp;
						<a id="btn-login-blur" href="#">Blur</a>
						&nbsp;
						<span class="blue">/</span>
						&nbsp;
						<a id="btn-login-light" href="#">Light</a>
						&nbsp; &nbsp; &nbsp;
					</div>

				</div>

			</div>
			
		</div>

	</div>
    @Scripts.Render("~/bundles/jquery")

	@Scripts.Render("~/bundles/jqueryval")

	<script type="text/javascript">
			
			//切换主题
			jQuery(function($) {
			 $('#btn-login-dark').on('click', function(e) {
				$('body').attr('class', 'login-layout');
				$('#id-text2').attr('class', 'white');
				$('#id-company-text').attr('class', 'blue');

				e.preventDefault();
			 });
			 $('#btn-login-light').on('click', function(e) {
				$('body').attr('class', 'login-layout light-login');
				$('#id-text2').attr('class', 'grey');
				$('#id-company-text').attr('class', 'blue');

				e.preventDefault();
			 });
			 $('#btn-login-blur').on('click', function(e) {
				$('body').attr('class', 'login-layout blur-login');
				$('#id-text2').attr('class', 'white');
				$('#id-company-text').attr('class', 'light-blue');

				e.preventDefault();
			 });

			});
	</script>
</body>
</html>
